* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 主要内容布局 */
.main-content {
    display: flex;
    gap: 20px;
    margin-top: -60px;
    width: 100%;
    overflow: hidden; /* 防止内容溢出 */
}

.content-left {
    flex: 1;
}

.content-right {
    width: 300px;
    flex-shrink: 0;
}

/* 新闻头部样式 */
.news-header {
    background: #fff;
    border-radius: 12px;
    padding: 20px 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.header-title h1 {
    font-size: 24px;
    color: #333;
}

.news-category {
    color: #007bff;
    font-size: 14px;
    padding: 4px 12px;
    background: #e8f2ff;
    border-radius: 4px;
    white-space: nowrap;
}

.news-meta {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
}

.meta-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.meta-item:last-child {
    margin-bottom: 0;
}

.meta-item i {
    margin-right: 8px;
    color: #666;
}

.meta-item span {
    color: #666;
    font-size: 14px;
}

/* 新闻内容样式 */
.news-container {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.news-content {
    padding: 10px;
    max-width: 100%;
    width: 100%;
    overflow: hidden; /* 防止内容溢出 */
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    letter-spacing: 0.5px;
}

.news-content p {
    margin-bottom: 0.8em;
    text-align: justify;
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

/* 优化文章段落样式 */
.dpu8C {
    font-size: 16px !important;
    line-height: 1.6 !important;
    color: #2c3e50 !important;
    margin-bottom: 0.8em !important;
    margin-top: 0.8em !important;
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif !important;
}

.dpu8C p {
    text-align: justify;
    margin-bottom: 0;
    word-spacing: 1px;
    text-indent: 2em;  /* 段落首行缩进 */
}

.news-image {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    border-radius: 8px;
    display: block;
}

.paragraph {
    margin-bottom: 16px;
}

/* 底部操作按钮 */
.action-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    background: #007bff;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 14px;
    transition: background-color 0.3s;
}

.action-btn i {
    margin: 0 6px;
}

.action-btn:hover {
    background: #0056b3;
}

.action-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 右侧列表样式 */
.sidebar-list {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.sidebar-title {
    font-size: 18px;
    color: #333;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
}

.sidebar-title i {
    margin-right: 8px;
    color: #007bff;
}

.sidebar-item {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.3s;
}

.sidebar-item:last-child {
    border-bottom: none;
}

.sidebar-item:hover {
    background: #f8f9fa;
    padding-left: 10px;
}

.sidebar-item-title {
    font-size: 14px;
    color: #333;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-item-meta {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #666;
}

.sidebar-item-meta i {
    margin-right: 4px;
    font-size: 12px;
}

.meta-divider {
    margin: 0 8px;
    color: #ddd;
}

/* 热门推荐样式 */
.hot-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.3s;
}

.hot-item:last-child {
    border-bottom: none;
}

.hot-item:hover {
    background: #f8f9fa;
    padding-left: 10px;
}

.hot-item-number {
    width: 24px;
    height: 24px;
    background: #f0f0f0;
    color: #666;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    margin-right: 12px;
}

.hot-item-number.top {
    background: #ff6b6b;
    color: white;
}

.hot-item-content {
    flex: 1;
}

.hot-item-title {
    font-size: 14px;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .container {
        padding: 0;
        margin-top: 0;
    }

    .main-content {
        margin-top: 0;
        gap: 10px;
    }

    .news-header,
    .news-container,
    .sidebar-list {
        padding: 15px;
        border-radius: 0;
        box-shadow: none;
    }

    .header-title {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-title h1 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .main-content {
        flex-direction: column;
    }

    .content-right {
        width: 100%;
        margin-top: 10px;
    }

    .news-content {
        padding: 10px;
        width: 100%;
        box-sizing: border-box;
    }

    .action-buttons {
        margin-top: 20px;
    }

    .action-btn {
        padding: 8px 16px;
    }

    .sidebar-item,
    .hot-item {
        padding: 10px 0;
    }

    .dpu8C {
        font-size: 15px !important;
        line-height: 1.5 !important;
        margin-bottom: 0.6em !important;
        margin-top: 0.6em !important;
    }

    .dpu8C p {
        text-indent: 1.5em;
    }

    .news-container {
        padding: 15px;
    }

    /* 确保所有可能的图片容器都不会溢出 */
    .news-content * {
        max-width: 100% !important;
        box-sizing: border-box;
    }
}

/* 优化文章阅读体验 */
@media (prefers-color-scheme: dark) {
    .news-content,
    .dpu8C {
        color: #2c3e50 !important;
    }
}

/* 优化选中文字的样式 */
.news-content ::selection,
.dpu8C ::selection {
    background: rgba(0, 123, 255, 0.2);
    color: inherit;
}

a{
    text-decoration: none;
    font-size: 14px;
    color: #333;
}

  /* 导航样式 */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    height: 40px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav li {
    margin-left: 30px;
}

.main-nav a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #007bff;
    background: rgba(0, 123, 255, 0.1);
}

/* 调整主体内容位置 */
.container {
    margin-top: 80px;
    padding: 20px;
}

/* 底部样式 */
.footer {
    background: #333;
    color: #fff;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin: 0 20px 20px;
}

.footer-section h4 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-section p {
    color: #ccc;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: #999;
    font-size: 14px;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .nav-container {
        padding: 10px 15px;
    }
    
    .logo {
        height: 30px;
    }
    
    .main-nav li {
        margin-left: 15px;
    }
    
    .main-nav a {
        font-size: 14px;
        padding: 6px 10px;
    }
    
    .footer-section {
        flex: 100%;
        margin: 0 0 30px;
    }
    
    .footer-content {
        padding: 0 15px;
    }
}

/* 图片响应式处理加强 */
.news-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 15px auto;
    box-sizing: border-box;
}

/* 处理富文本编辑器中的图片容器 */
.news-content p img,
.news-content div img,
.news-content figure img {
    max-width: 100% !important;
    height: auto !important;
    margin: 0 auto;
}

/* 处理可能包含图片的容器 */
.news-content p,
.news-content div,
.news-content figure {
    max-width: 100% !important;
    margin: 15px 0;
    word-wrap: break-word;
}